package org.cos.generation.epda;

import java.util.LinkedList;
import java.util.List;

import org.cos.generation.epda.action.Action;

public interface EPDASetter {
	
	/**
	 * Create a new state.
	 * @return
	 */
	public int newState();
	
	/**
	 * Add a new transition form active state to a new state. 
	 * @param method
	 * @param conditions
	 * @param actions
	 */
	public void grow(Method method,	List<Condition> conditions, 
			LinkedList<Action> actions);
	
	/**
	 * Add a new transition form active state to a given state.
	 * @param tailIndex
	 * @param method
	 * @param conditions
	 * @param actions
	 */
	public void link(int tailIndex, Method method,	
			List<Condition> conditions,	List<Action> actions);
	
	/**
	 * Transform to a given state.
	 * @param stateIndex
	 */
	public void trans(int stateIndex);
	
	/**
	 * Delete all states.
	 */
	public void clear();
	
	/**
	 * Add a list of states.
	 * @param size
	 * @param states
	 */
	public void addStates(int size, State states[]);
	
}
